<%-- 
    Document   : createloan
    Created on : Apr 24, 2012, 5:32:47 PM
    Author     : Jayson Kiong
--%>

<%@page import="Model.User"%>
<%@page import="java.util.Date"%>
<%@page import="java.text.SimpleDateFormat"%>
<%@page import="java.util.Calendar"%>
<%@page contentType="text/html" pageEncoding="UTF-8"%>
<!DOCTYPE html>
<html>
    <head>
        <meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
        <meta http-equiv="Pragma" content="no-cache">
        <meta http-equiv="Cache-Control" content="no-cache">
        <meta http-equiv="Expires" content="Sat, 01 Dec 2001 00:00:00 GMT">
        <title>QuickLend Loan Management System</title>
        <link rel = "stylesheet" type = "text/css" href = "quicklendstyle.css"/>
        <link type="text/css" href="css/ui-lightness/jquery-ui-1.8.19.custom.css" rel="stylesheet" />
	<script type="text/javascript" src="js/jquery-1.7.2.min.js"></script>
	<script type="text/javascript" src="js/jquery-ui-1.8.19.custom.min.js"></script>
       
	<script type="text/javascript">
		$(function(){

			// Accordion
			$("#accordion").accordion({ header: "h3" });

			// Tabs
			$('#tabs').tabs();

			// Dialog
			$('#dialog').dialog({
				autoOpen: false,
				width: 600,
				buttons: {
					"Ok": function() {
						$(this).dialog("close");
					},
					"Cancel": function() {
						$(this).dialog("close");
					}
				}
			});
				// Dialog Link
			$('#dialog_link').click(function(){
				$('#dialog').dialog('open');
				return false;
			});
				// Datepicker
			$('#datepicker').datepicker({
				inline: true
			});
				// Slider
			$('#slider').slider({
				range: true,
				values: [17, 67]
			});
				// Progressbar
			$("#progressbar").progressbar({
				value: 20
			});
				//hover states on the static widgets
			$('#dialog_link, ul#icons li').hover(
				function() { $(this).addClass('ui-state-hover'); },
				function() { $(this).removeClass('ui-state-hover'); }
			);
                            
                            
			});
                        
                     
	</script>
        
	<style type="text/css">
			/*demo page css*/
		body{ font: 62.5% "Segoe UI", sans-serif; margin: 50px;}
		.demoHeaders { margin-top: 2em; }
		#dialog_link {padding: .4em 1em .4em 20px;text-decoration: none;position: relative;}
		#dialog_link span.ui-icon {margin: 0 5px 0 0;position: absolute;left: .2em;top: 50%;margin-top: -8px;}
		ul#icons {margin: 0; padding: 0;}
		ul#icons li {margin: 2px; position: relative; padding: 4px 0; cursor: pointer; float: left;  list-style: none;}
		ul#icons span.ui-icon {float: left; margin: 0 4px;}
	</style>
        
    </head>
    <body>
        <%User user = (User)session.getAttribute("user");
          
        %>
          <div id="welcomepanel" style="position: absolute; top:10px; left:10px;">
            <img src="images/welcomepanel.png" alt=""></img>
          </div> 
        <%
             Calendar currentDate = Calendar.getInstance();
             SimpleDateFormat formatter=  new SimpleDateFormat("MMMM dd yyyy");
             SimpleDateFormat timeformat = new SimpleDateFormat("hh:mm a");
             String timeNow = timeformat.format(currentDate.getTime());
             String dateNow = formatter.format(currentDate.getTime());
             int weekday = currentDate.get(Calendar.DAY_OF_WEEK);
             String dayofweek = "";
             
             switch(weekday){
                   case 0: dayofweek="Sunday"; break;
                   case 1: dayofweek="Monday"; break;
                   case 2: dayofweek="Tuesday"; break;
                   case 3: dayofweek="Wednesday"; break;
                   case 4: dayofweek="Thursday"; break;
                   case 5: dayofweek="Friday"; break;
                   case 6: dayofweek="Saturday"; break;
                           
             }
             
        %>
          <div id="welcometext" style="position: absolute; top:75px; left:38px; font-size:18px; font-family:Segoe UI; ">

              <p>Welcome <%=user.getStrFirstname()%>!</br>Date: <%=dateNow%> , <%=dayofweek%></br>Time: <%=timeNow%></p>

              
          </div>
        
        <div id="accordion" style="position: absolute; top:185px; left:13px; width:335px ; height:450px">
            <div>
                <h3><a href="#">Application</a></h3>
                <div>
                     <form action="PrecompServlet" method="POST" target="myframe">
                     <input type="image" src="images/precompimage.png" size="13" style="position:absolute; left:5px" />
                     </form>              
                     <a href="#" class="checkbtn" name="checkbtn"  size="13" style="position:absolute; left:166px"><img src="images/writercheck.png" alt=""></img></a>
                     <form action="SalesReport" method="GET" target="myframe">
                     <input type="image" src="images/reportsimage.png" size="13" style="position:absolute; top:65px;left:5px" />
                     </form> 
                </div>
            </div>
            <div>
                 <h3><a href="#">Categories</a></h3>
                 <div>
                     <form action="LoanServlet" method="POST" target="myframe">
                     <input type="image" src="images/loansimage.png" size="13" style="position:absolute; left:0px" />
                     </form>
                     <form action="soa.jsp" method="POST" target="myframe">
                     <input type="image" src="images/soaimage.png" size="13" style="position:absolute; left:153px" />  
                     </form>
                     <form action="TypeServlet" method="POST" target="myframe">
                     <input type="image" src="images/typesimage.png" size="13" style="position:absolute; left:0px; top:60px;" />
                     </form>
                     <form action="TermServlet" method="POST" target="myframe">
                     <input type="image" src="images/termsimage.png" size="13" style="position:absolute;left:153px; top:60px;" />
                     </form>
                     <form action="AgentServlet" method="POST" target="myframe">
                     <input type="image" src="images/agentimage.png" size="13" style="position:absolute; left:0px; top:109px;" />
                     </form>
                 </div>
                 
            </div>
            <div>
                    <h3><a href="#">Security</a></h3>
                    <div>
                        <form action="edituseraccount.jsp" method="POST" target="myframe">
                         <input type="image" src="images/edituseraccount.png" size="13" style="position:absolute; left:0px" />
                        </form>
                        <form action="/Quicklend/LogoutServlet" method="POST">
                         <input type="image" src="images/logoutimage.png" size="13" style="position:absolute; left:160px" />
                        </form>
                        <form action="/Quicklend/ApproveUserServlet" method="POST" target="myframe">
                         <input type="image" src="images/approveuserimage.png" size="13" style="position:absolute; top:65px; left:0px" />
                        </form>   
                    </div>
            </div>
	</div>
              
              
       
        <div id="contentbg" style="position: absolute; top:8px; left:350px;">
            <img src="images/contentbg4.png" alt=""></img>
            <iframe id="myframe" src="PrecompServlet" style="position:absolute; top:0px; left:0px; width:930px; height:650px" frameBorder="0"></iframe>
        </div>
   
    </body>
    
</html>
